package com.ruoyi.teach.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teach.mapper.SchStudentLeaveMapper;
import com.ruoyi.teach.domain.SchStudentLeave;
import com.ruoyi.teach.service.ISchStudentLeaveService;

/**
 * 学生退学Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-13
 */
@Service
public class SchStudentLeaveServiceImpl implements ISchStudentLeaveService 
{
    @Autowired
    private SchStudentLeaveMapper schStudentLeaveMapper;

    /**
     * 查询学生退学
     * 
     * @param lId 学生退学主键
     * @return 学生退学
     */
    @Override
    public SchStudentLeave selectSchStudentLeaveByLId(Long lId)
    {
        return schStudentLeaveMapper.selectSchStudentLeaveByLId(lId);
    }

    /**
     * 查询学生退学列表
     * 
     * @param schStudentLeave 学生退学
     * @return 学生退学
     */
    @Override
    public List<SchStudentLeave> selectSchStudentLeaveList(SchStudentLeave schStudentLeave)
    {
        return schStudentLeaveMapper.selectSchStudentLeaveList(schStudentLeave);
    }

    /**
     * 新增学生退学
     * 
     * @param schStudentLeave 学生退学
     * @return 结果
     */
    @Override
    public int insertSchStudentLeave(SchStudentLeave schStudentLeave)
    {
        schStudentLeave.setCreateTime(DateUtils.getNowDate());
        return schStudentLeaveMapper.insertSchStudentLeave(schStudentLeave);
    }

    /**
     * 修改学生退学
     * 
     * @param schStudentLeave 学生退学
     * @return 结果
     */
    @Override
    public int updateSchStudentLeave(SchStudentLeave schStudentLeave)
    {
        schStudentLeave.setUpdateTime(DateUtils.getNowDate());
        return schStudentLeaveMapper.updateSchStudentLeave(schStudentLeave);
    }

    /**
     * 批量删除学生退学
     * 
     * @param lIds 需要删除的学生退学主键
     * @return 结果
     */
    @Override
    public int deleteSchStudentLeaveByLIds(Long[] lIds)
    {
        return schStudentLeaveMapper.deleteSchStudentLeaveByLIds(lIds);
    }

    /**
     * 删除学生退学信息
     * 
     * @param lId 学生退学主键
     * @return 结果
     */
    @Override
    public int deleteSchStudentLeaveByLId(Long lId)
    {
        return schStudentLeaveMapper.deleteSchStudentLeaveByLId(lId);
    }

    @Override
    public SchStudentLeave selectsid(Long sId) {
        return schStudentLeaveMapper.selectsid(sId);
    }
}
